public class HomeWorkDemo01 {
    public static void main(String[] args) {
        // 银行卡
        BankCard bankCard = new BankCard("光大银行储蓄卡", 1000, "123456");
        // 信用卡
        Credit credit = new Credit(2000);
        credit.setName("光大银行信用卡");
        credit.setIDCard("88888888");
        System.out.println(credit);
    }

}


class BankCard {
    private String name;
    private int balance;
    private String IDCard;

    public BankCard() {
    }

    public BankCard(String name, int balance, String IDCard) {
        this.name = name;
        this.balance = balance;
        this.IDCard = IDCard;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public String getIDCard() {
        return IDCard;
    }

    public void setIDCard(String IDCard) {
        this.IDCard = IDCard;
    }
}

class Credit extends BankCard {
    private int quota;

    public Credit(int quota) {
        this.quota = quota;
    }

    public int getQuota() {
        return quota;
    }

    public void setQuota(int quota) {
        this.quota = quota;
    }

    @Override
    public String toString() {
        return "这是一张信用卡";
    }
}
